Skip to content
  • 0 Votes
    9 Posts
    957 Views
    GrecKoG

    Nouvelle syntaxe qui a 10 ans pour info ;)

  • 0 Votes
    12 Posts
    2k Views
    Tor ArneT

    Please report this as a bug in JIRA, with a minimal test case, so that we can check whether this is a 5.15 regression, a Big Sur issue, or something also present in Catalina.

  • 0 Votes
    4 Posts
    913 Views
    F

    The problem was that my class inherited QGraphicsItem, not QObject, but I found another way to do what I wanted. From now on, I will use the new syntax. Thank you!

  • 0 Votes
    13 Posts
    4k Views
    Pl45m4P

    @Burke212

    One more thing... :)
    So you create 10 Buttons and connect them somehow to "numPressed", that prints or computes the button-number, if a button is clicked + released, right?

    The use of a QButtonGroup would make this even easier.
    https://doc.qt.io/qt-5.6/qbuttongroup.html

    Add your buttons to your buttonGroup and setID of each button.
    ButtonGroup also provides signals and functions to work with. Maybe your own connection is not necessary anymore and you dont need to rename every single button, because you can work with the groupID.

    When adding the buttons to your group, set your own IDs, as the default buttonID in a buttonGroup starts at -2 and decreases with every additional button (this gave me headache in one of my projects some time ago... Of course, I didnt set my own IDs and was expecting the ID to start at 0 increasing. And of course I didnt read the Docs of the addButton-Function back then) :)

  • 0 Votes
    2 Posts
    2k Views
    R_IrudezuR

    i did a very bad mistake...

    The mistake is creating two instance of workerThread class, so connection returns true because of the instance of workerThread is just emitting but other instance is just connecting. So it needs to be only one instance and one connection in my case.

    added to workerthread.h:

    extern workerThread *t1;

    changed in workerthread.cpp

    emit t1->sendLocationsFromThread(x, y, w, h);

    changed in mainwindow.cpp

    bool callBackThreadConn = connect(w1, SIGNAL(sendLocationsFromThread(int, int, int, int)), this, SLOT(onLocationChanged(int, int, int, int)));

    it's ok now, data can be send to GUI

  • 0 Votes
    4 Posts
    2k Views
    A

    @silau It looks good but ldd doesn't always report exactly what is actually happening when you run your exe. It's a good start though. If you really wanted to trace it further you would have to ldd on each of those libs to see what they link. One of them could be using the 5.6 or whatever other version you may have. That being said I find that to be a bit unlikely though.

    When I get a little bit of time later today I will run your code using Arch linux and 5.11 and see what happens. That will help determine if maybe it's a bug in Qt (which I highly doubt for something that big).

    If it works for me the next steps for you would be to run it in the debugger and step through the working 5.6 one during socket connections and then the broken 5.11 one and see what is different.

    Another option is take it down to the simplest form and just use the chat example or something from Qt and see if it works with 5.11 and then try to see what is different.

    I'll let you know what I find out on my linux/Qt 5.11 in a bit.

    Edit: Didn't get a chance today, was really busy. I will run a quick test tomorrow some time though.

  • 1 Votes
    5 Posts
    4k Views
    mrjjM

    @koahnig
    Well the "MySQL server has gone away" msg also seems slightly "wooden" so it fits perfectly :)